#root {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.App {
  position: relative;
  min-height: 100vh;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.App h1 {
  color: #333;
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-align: center;
}

.instructions {
  text-align: center;
  margin-bottom: 30px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.instructions p {
  margin: 5px 0;
  color: #666;
  font-size: 14px;
}

.table-container {
  width: 100%;
  overflow-x: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  font-size: 14px;
  color: #666;
}

.items-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
}

.items-per-page label {
  font-weight: 500;
}

.items-per-page select {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.data-table th,
.data-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.data-table th {
  background-color: #f8f9fa;
  color: #333;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
}

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
  position: relative;
}

.data-table th.sortable:hover {
  background-color: #e9ecef;
}

.data-table th.sorted {
  background-color: #e3f2fd;
  color: #1976d2;
}

.sort-indicator {
  font-weight: bold;
  margin-left: 5px;
}

.data-table tbody tr {
  transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
  background-color: #f5f5f5;
}

.data-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.data-table tbody tr:nth-child(even):hover {
  background-color: #f0f0f0;
}

.phone-number {
  cursor: pointer;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-block;
  min-width: 100px;
}

.phone-number:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.phone-number.local-phone {
  background-color: rgba(173, 216, 230, 0.3);
  border: 1px solid rgba(173, 216, 230, 0.5);
}

.phone-number.local-phone:hover {
  background-color: rgba(173, 216, 230, 0.4);
  transform: translateY(-1px);
}

.local-indicator {
  margin-left: 5px;
  font-size: 12px;
  opacity: 0.7;
}

.empty-phone {
  color: #999;
  font-style: italic;
  opacity: 0.6;
}

/* 公司相关样式 */
.company-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.company-name {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.company-name:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.company-name.completed {
  color: #28a745;
}

.company-name.pending {
  color: #ffc107;
}

.status-badge {
  font-size: 14px;
  font-weight: bold;
}

.status-badge.completed {
  color: #28a745;
}

.status-badge.pending {
  color: #ffc107;
}

.company-notes {
  font-size: 12px;
  color: #666;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.8;
}

.company-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

.company-status.completed {
  background-color: #d4edda;
  color: #155724;
}

.company-status.pending {
  background-color: #fff3cd;
  color: #856404;
}

.context-menu {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  min-width: 160px;
  z-index: 1000;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: background-color 0.2s ease;
}

.menu-item:hover {
  background-color: #f5f5f5;
}

.status-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 10px;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.menu-section {
  margin: 0;
}

.menu-section-title {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu-divider {
  height: 1px;
  background-color: #e9ecef;
  margin: 0;
}

.local-icon {
  margin-right: 10px;
  font-size: 16px;
}

.tooltip {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  white-space: pre-wrap;
  max-width: 250px;
  word-break: break-word;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  pointer-events: none;
  transform: translate(-50%, -100%);
  margin-top: -5px;
  line-height: 1.5;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(0, 0, 0, 0.9);
}

/* 分页样式 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: all 0.2s ease;
  min-width: 40px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #e9ecef;
  border-color: #adb5bd;
}

.pagination-btn:disabled {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.pagination-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.pagination-btn.active:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

.pagination-pages {
  display: flex;
  gap: 5px;
}

/* 编辑备注弹窗样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal {
  background: white;
  border-radius: 8px;
  padding: 20px;
  min-width: 400px;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 18px;
}

.modal textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.modal textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 15px;
}

.modal-actions button {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.modal-actions button:first-child {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.modal-actions button:first-child:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

.modal-actions button:last-child {
  background-color: #6c757d;
  color: white;
  border-color: #6c757d;
}

.modal-actions button:last-child:hover {
  background-color: #5a6268;
  border-color: #5a6268;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .App {
    padding: 10px;
  }
  
  .App h1 {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  .table-info {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 15px;
  }

  .items-per-page {
    align-self: center;
  }
  
  .data-table {
    font-size: 12px;
  }
  
  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }
  
  .phone-number {
    min-width: 80px;
    font-size: 12px;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 5px;
    padding: 15px 10px;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 12px;
    min-width: 35px;
    height: 32px;
  }

  .pagination-pages {
    gap: 3px;
  }

  .company-cell {
    flex-direction: column;
    gap: 3px;
  }

  .company-name {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .company-notes {
    max-width: 150px;
    font-size: 11px;
  }

  .modal {
    min-width: 300px;
    margin: 20px;
  }

  .modal-actions {
    flex-direction: column;
    gap: 8px;
  }

  .modal-actions button {
    width: 100%;
  }
}

/* 滚动条样式 */
.table-container::-webkit-scrollbar {
  height: 8px;
}

.table-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
